#!/bin/sh

#TubeMan static analysis with cppcheck
supp="testing/cppcheck.supp"
out=$(cppcheck --inline-suppr --suppressions-list=$supp --enable=all --force \
      --std=c99 -UDEFAULT_TEXT_DOMAIN -U__GNUC__ -Isrc src/*.{c,h} gtk/*.{c,h} 2>&1)
echo "$out"
if echo "$out" | grep -q "(error)"; then
	echo "Error found!"
	exit 1
else
	echo "No errors found."
	exit 0
fi
